#!/usr/bin/env python
# -*- coding:utf-8 -*-
#调用被封装的内容（变量）

class Foo():
    def __init__(self,name,age):
        self.name=name
        self.age=age
    def detail(self):
        print self.name
        print self.age

obj=Foo('tom',18)
print obj.name
print obj.age
obj.detail()